import actionType from  "../action"
//state表示数据
//action表示如何修改数据
let  numReducer = (state={num:10},action:any)=>{
    console.log(action);
   switch(action.type){
       case  actionType.ADD:
           return  {num:state.num+action.payload}

   }

    return  state;
}
export  default  numReducer;